﻿//        Another Demo from Andy L. & MissedMemo.com
// Borrow whatever code seems useful - just don't try to hold
// me responsible for any ill effects. My demos sometimes use
// licensed images which CANNOT legally be copied and reused.

using System;
using System.Windows.Data;

using MissedMemo.MeatAndCheeseDisc.OrderMonitorService.OrderProcessing;


namespace MissedMemo.MeatAndCheeseDisc.OrderMonitor
{
    public class SizeToAbbreviationConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string strSize = (string)value;

            switch( strSize )
            {
                case "Mini":
                    return "mini";
                
                case "Small":
                    return "s";

                case "Medium":
                    return "M";

                case "Large":
                    return "L";

                case "FamilySize":
                    return "XL";
            }

            return string.Empty;
        }


        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
